<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:66:"/data/release/shop/public/../application/home/view/coupon/add.html";i:1511407305;s:67:"/data/release/shop/public/../application/home/view/public/base.html";i:1511407309;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="../../static/home/css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../../static/home/css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../static/home/css/foundation-datepicker.css"/>
		<link rel="stylesheet" type="text/css" href="../../static/home/css/font-awesome.css"/>
		<script src="../../static/home/js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
		<title></title>
	</head>


<body>
<div class="bj">
	<!--头部-->
	
	<div class="head">
		<div class="h-top">
			<ul>
				<li><a href="#"></a><span></span></li>
				<li><a href="#"></a><span></span></li>
				<li><a href="#"></a><span></span></li>
				<li><a href="#"></a></li>
			</ul>
			<div class="clear"></div>
		</div>
		<div class="h-name">
			<div class="name">
				<div class="logo left">
					<a href="#"><img src="../../static/home/img/logo.png" style="height: 40px;"/></a>
				</div>
				<div class="assistant right">
					<div class="img">
						<img src="../../static/home/img/assistant.png"/>
					</div>
					<div class="b-div">
						<img src="../../static/home/img/assistant.png"/>
						<p class="t2"><a href="../business/index">账号设置</a></p>
						<p class="t2"><a href="../index/quitLogin">退出登录</a></p>
					</div>
				</div>

			</div>
		</div>
	</div>
	
	<!--内容-->
	<div class="c">
		<div class="content">
			
			<div class="c-l left">
						<div class="c-left">
							<div class="list">
								<div class="">
									<i class="statistics"></i><span>统计分析</span>
								</div>
								<ul>
									<li><a href="../index/index">概况分析</a></li>
									<li><a href="../index/user">用户分析</a></li>

								</ul>

							</div>



							<div class="list">
								<div class="">
									<i class="imgicon"></i><span>图片管理</span>
								</div>
								<ul>
									<li><a href="../banner/index">图片管理</a></li>
								</ul>

							</div>

							<div class="list">
								<div class="">
									<i class="product"></i><span>产品管理</span>
								</div>
								<ul>
									<li><a href="../commtype/index">分类管理</a></li>
									<li><a href="../goods/index">商品管理</a></li>
									<li><a href="../integral/index">积分商品管理</a></li>
									<li><a href="../freight/index">运费模板管理</a></li>

								</ul>
							</div>

							<div class="list">
								<div class="">
									<i class="member"></i><span>会员管理</span>
								</div>
								<ul>
									<li><a href="../user/index">会员列表</a></li>
								</ul>
							</div>

							<div class="list">
								<div class="">
									<i class="order"></i><span>订单管理</span>
								</div>
								<ul>
									<li><a href="../order/index">待付款</a></li>
									<li><a href="../order/delivergoods">待发货</a></li>
									<li><a href="../order/takegoods">待收货</a></li>
									<li><a href="../order/complete">已完成</a></li>
									<li><a href="../order/occlude">已关闭</a></li>

								</ul>

							</div>

							<div class="list">
								<div class="">
									<i class="assets"></i><span>提现管理</span>
								</div>
								<ul>
									<li><a href="../takeout/index">提现审核</a></li>
									<li><a href="../takeout/record">提现记录</a></li>
								</ul>
							</div>
							<div class="list">
								<div class="">
									<i class="assets"></i><span>资产管理</span>
								</div>
								<ul>
									<li><a href="../record/index">交易记录</a></li>
								</ul>
							</div>
							<div class="list">
								<div class="">
									<i class="voucher"></i><span>优惠券</span>
								</div>
								<ul>
									<li><a href="../coupon/index">优惠券列表</a></li>


								</ul>
							</div>
							<div class="list">
								<div class="">
									<i class="hzpnews"></i><span>资讯管理</span>
								</div>
								<ul>
									<li><a href="../hzpnews/index">资讯列表</a></li>

								</ul>
							</div>

							<div class="list">
								<div class="">
									<i class="comment"></i><span>评论管理</span>
								</div>
								<ul>
									<li><a href="../comment/index">评论列表</a></li>

								</ul>
							</div>


							<div class="list">
								<div class="">
									<i class="setup"></i><span>基本设置</span>
								</div>
								<ul>
									<li><a href="">基本设置</a></li>
									<li><a href="../express/index">快递设置</a></li>

									<li><a href="../payments/index">支付设置</a></li>

									<li><a href="../business/index">商家基本信息</a></li>
									<!--<li><a href="">管理员信息</a></li>-->
								</ul>
							</div>

						</div>

					</div>

			<!--<div id="main" style="width: 600px;height:400px;"></div>-->
			
			


			
<input type="hidden" name="mun_url" id="mun_url" value="7,0"/>
<div class="c-r right">
	<div class="label1">
		<div class="title">
			优惠券
		</div>
		<div class="breadcrumb">
									<span>
										<a href="#">插件管理 </a>
										<span class="separator">/</span>
									</span>
									<span>
										<a href="add_coupon.html">优惠券 </a>
										<span class="separator">/</span>
									</span>
									<span>
										<span>新增优惠券</span>
									</span>
		</div>
		<div class="label-4">
			<div class="form" id="form" style="padding-left: 30px;overflow: visible;">

				<form action="insert" method="post" class="form-2" >
					<div><label class="ltxt">发送数量:</label><input type="text" name="number" id="" value=""  style="width: 245px;"/>张<span></span></div>
					<div><label class="ltxt">面值:</label><input type="text" name="money" id="" value=""  style="width: 245px;"/>元<span></span></div>
					<div><label class="ltxt">使用限制:</label>订单满<input type="text" name="full_money" id="" value=""  style="width: 80px;margin: 0 8px;"/>可用<span></span></div>

					<div><label class="ltxt">优惠券类型:</label>
						<div class="bor bor2 bor4">
							<span data-type = "1">通用性</span><i></i>
							<ul style="display: none;">
								<li data-type = "1">通用</li>
								<li data-type = "3">分类</li>
								<li data-type = "2">商品</li>
								<li data-type = "4">注册</li>
							</ul>
						</div>
						<span></span>
					</div>
					<div><label class=""></label>

						<div class="bor bor2 bor11" style="display: none;">

							<span>请选择分类</span><i></i>
							<ul style="display: none;">
								<?php if(is_array($menus) || $menus instanceof \think\Collection || $menus instanceof \think\Paginator): if( count($menus)==0 ) : echo "" ;else: foreach($menus as $key=>$vo): ?>
								<li data-type = "<?php echo $vo['tid']; ?>"><?php echo $vo['name']; ?></li>
								<?php endforeach; endif; else: echo "" ;endif; ?>

							</ul>
						</div>
						<div class="bor bor2 bor12" style="display: none;">
							<span>请选择商品</span><i></i>
							<ul style="display: none;">
								<?php if(is_array($goods) || $goods instanceof \think\Collection || $goods instanceof \think\Paginator): if( count($goods)==0 ) : echo "" ;else: foreach($goods as $key=>$vo): ?>
								<li data-type = "<?php echo $vo['goodsid']; ?>"><?php echo $vo['name']; ?></li>
								<?php endforeach; endif; else: echo "" ;endif; ?>
							</ul>
						</div>
						<span></span>
					</div>

					<div><label class="ltxt">优惠券有效日期:</label>
						<input type="text"  value="" id="demo-3" name="starttime" style="width: 245px;"><b class="b">至</b><input type="text"  value="" id="demo-4" name="endtime" style="width: 245px;">
						<span>优惠券创建后即可被领取，这里设置的「开始时间」是指优惠券可被使用的时间</span>
					</div>
					<input type="hidden" name="type" id="number" value="" />
					<input type="hidden" name="typeq" id="typeq" value="" />
					<div class="mtop"><label></label><button class="blue btn-right sub">完成</button><button class="blue btn-right">返回</button></div>
					<div class="clear"></div>
				</form>
			</div>
		</div>

	</div>
</div>


<script src="../../static/home/js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/home/js/js.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/home/js/foundation-datepicker.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/home/js/foundation-datepicker.zh-CN.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	function check(){
		var number = document.getElementById("number");
		var money = document.getElementById("money");

		if(number == ""){
			alert("发送数量不能为空！");
			return false;
		}
		if(number == "0"){
			alert("发送数量不能为0！");
			return false;
		}
		if(money == ""){
			alert("金额不能为空！");
			return false;
		}
		if(money == "0"){
			alert("金额不能为0！");
			return false;
		}

	}
	$('#demo-1').fdatepicker({
		format: 'yyyy-mm-dd',
	});
	$('#demo-2').fdatepicker({
		format: 'yyyy-mm-dd',
	});
	$('#demo-3').fdatepicker({
		format: 'yyyy-mm-dd',
	});
	$('#demo-4').fdatepicker({
		format: 'yyyy-mm-dd',
	});

	//提交表单
	$(".blue").click(function(){
		var data_type = $("#form form .bor4 span").attr('data-type')
		$("#number").val(data_type)
		if (select_tw == '2') {
			var data_type1 = $("#form form .bor11 span").attr('data-type')
			$("#typeq").val(data_type1)
		}
		if(select_tw == '3'){
			var data_type2 = $("#form form .bor12 span").attr('data-type')
			$("#typeq").val(data_type2)
		}

	})
	function regular(j,txt) {
		//var mail = regular;
		var j = $("input[name="+j+"]").val()
		if(j == '' || j == null){
			prompt(txt+'不可为空',0)
			return false;
			//console.log('正确')
		}
		if (j == '0'){
			prompt(txt+'不能为0',0)
			return false;
		}
		return true
	}
	$('.sub').click(function () {
		if (!regular('number','数量') || !regular('money','面值')) {
			return false
		}

	})

</script>

			<!--<div id="main" style="width: 600px;height:400px;"></div>-->
		</div>

	</div>

	<!--尾部-->
	
	<div class="foot">
		Copyright © 2016 - 2017 qingful.com All Rights Reserved
	</div>
	
	<!--返回顶部-->


</div>
<script src="../../static/home/js/dateRange.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/home/js/js.js" type="text/javascript" charset="utf-8"></script>
<script>
	//索引0开始
	var mun_url = $('#mun_url').val();											//获取页面参数
	var arrmun_url = mun_url.split(",")											//转成数组格式
	var leftul = $(".c .c-l .list ul").eq(arrmun_url[0]).find('li').length		//获取元素数量
	$(".c .c-l .list ul").eq(arrmun_url[0]).css('height',50*leftul)				//设置高度
	$(".c .c-l .list ul").eq(arrmun_url[0]).find('li').eq(arrmun_url[1]).attr('class','act')	//添加样式
</script>
</body>

</html>








